<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Paho C++: mqtt::iaction_listener Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Paho C++
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">The Paho MQTT C++ Client Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classmqtt_1_1iaction__listener.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classmqtt_1_1iaction__listener-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">mqtt::iaction_listener Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Provides a mechanism for tracking the completion of an asynchronous action.  
 <a href="classmqtt_1_1iaction__listener.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="iaction__listener_8h_source.html">iaction_listener.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a2110b13a183f201ff73afb330073851b"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iaction__listener.html#a2110b13a183f201ff73afb330073851b">ptr_t</a> = std::shared_ptr&lt; <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &gt;</td></tr>
<tr class="memdesc:a2110b13a183f201ff73afb330073851b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Smart/shared pointer to an object of this class.  <a href="#a2110b13a183f201ff73afb330073851b">More...</a><br/></td></tr>
<tr class="separator:a2110b13a183f201ff73afb330073851b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9441da1eeccfa762776d9a2f36aedcda"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iaction__listener.html#a9441da1eeccfa762776d9a2f36aedcda">const_ptr_t</a> = std::shared_ptr&lt; const <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a> &gt;</td></tr>
<tr class="memdesc:a9441da1eeccfa762776d9a2f36aedcda"><td class="mdescLeft">&#160;</td><td class="mdescRight">Smart/shared pointer to a const object of this class.  <a href="#a9441da1eeccfa762776d9a2f36aedcda">More...</a><br/></td></tr>
<tr class="separator:a9441da1eeccfa762776d9a2f36aedcda"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab8342c32c4c6fe0aa9854ee01449834c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab8342c32c4c6fe0aa9854ee01449834c"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iaction__listener.html#ab8342c32c4c6fe0aa9854ee01449834c">~iaction_listener</a> ()</td></tr>
<tr class="memdesc:ab8342c32c4c6fe0aa9854ee01449834c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual base destructor. <br/></td></tr>
<tr class="separator:ab8342c32c4c6fe0aa9854ee01449834c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac41d97b2a4139345911c1db38fd59fba"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iaction__listener.html#ac41d97b2a4139345911c1db38fd59fba">on_failure</a> (const <a class="el" href="classmqtt_1_1token.html">token</a> &amp;asyncActionToken)=0</td></tr>
<tr class="memdesc:ac41d97b2a4139345911c1db38fd59fba"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method is invoked when an action fails.  <a href="#ac41d97b2a4139345911c1db38fd59fba">More...</a><br/></td></tr>
<tr class="separator:ac41d97b2a4139345911c1db38fd59fba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1129c3d73263ccb6abde984eed98ffef"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmqtt_1_1iaction__listener.html#a1129c3d73263ccb6abde984eed98ffef">on_success</a> (const <a class="el" href="classmqtt_1_1token.html">token</a> &amp;asyncActionToken)=0</td></tr>
<tr class="memdesc:a1129c3d73263ccb6abde984eed98ffef"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method is invoked when an action has completed successfully.  <a href="#a1129c3d73263ccb6abde984eed98ffef">More...</a><br/></td></tr>
<tr class="separator:a1129c3d73263ccb6abde984eed98ffef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Provides a mechanism for tracking the completion of an asynchronous action. </p>
<p>A listener is registered on a token and that token is associated with an action like connect or publish. When used with tokens on the <a class="el" href="classmqtt_1_1async__client.html" title="Lightweight client for talking to an MQTT server using non-blocking methods that allow an operation t...">async_client</a> the listener will be called back on the MQTT client's thread. The listener will be informed if the action succeeds or fails. It is important that the listener returns control quickly otherwise the operation of the MQTT client will be stalled. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a9441da1eeccfa762776d9a2f36aedcda"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classmqtt_1_1iaction__listener.html#a9441da1eeccfa762776d9a2f36aedcda">mqtt::iaction_listener::const_ptr_t</a> =  std::shared_ptr&lt;const <a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Smart/shared pointer to a const object of this class. </p>

</div>
</div>
<a class="anchor" id="a2110b13a183f201ff73afb330073851b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classmqtt_1_1iaction__listener.html#a2110b13a183f201ff73afb330073851b">mqtt::iaction_listener::ptr_t</a> =  std::shared_ptr&lt;<a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a>&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Smart/shared pointer to an object of this class. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac41d97b2a4139345911c1db38fd59fba"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mqtt::iaction_listener::on_failure </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmqtt_1_1token.html">token</a> &amp;&#160;</td>
          <td class="paramname"><em>asyncActionToken</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method is invoked when an action fails. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">asyncActionToken</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1129c3d73263ccb6abde984eed98ffef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mqtt::iaction_listener::on_success </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmqtt_1_1token.html">token</a> &amp;&#160;</td>
          <td class="paramname"><em>asyncActionToken</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This method is invoked when an action has completed successfully. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">asyncActionToken</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/mqtt/<a class="el" href="iaction__listener_8h_source.html">iaction_listener.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>mqtt</b></li><li class="navelem"><a class="el" href="classmqtt_1_1iaction__listener.html">iaction_listener</a></li>
    <li class="footer">Generated on Sun Jul 23 2017 10:24:30 for Paho C++ by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
